package com.hdax.dm.controller;

import com.hdax.dm.Service.AreaService;
import com.hdax.dm.dto.CommonResponse;
import com.hdax.dm.dto.DtoUtil;
import com.hdax.dm.dto.base.AreaDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class AreaController {

    @Autowired
    private AreaService areaService;

    @PostMapping(path = "/querycity")
    public CommonResponse<List<AreaDto>> area(){
        return DtoUtil.returnSuccess("",areaService.findArea());
    }

}
